import QuestionTypeEnum from "@/enums/QuestionTypeEnum";
import BoolEnum from "@/enums/BoolEnum";

/**
 * @param label 表头
 * @param prop 字段名
 * @param isSearch 是否筛选项
 * @type {[{isSearch: boolean, prop: string, label: string},{isSearch: boolean, prop: string, label: string},{isSearch: boolean, prop: string, label: string},{isSearch: boolean, prop: string, label: string, enum: {0: string, 1: string, 2: string}}]}
 */
const tableColumn = [{
  label: "问诊单ID",
  prop: "id",
  isTable: true
}, {
  label: "问诊单名称",
  prop: "title",
  isTable: true,
  isSearch: true,
  formType: "input",
}, {
  label: "问题类型",
  prop: "type",
  isTable: true,
  isSearch: true,
  formType: "radio",
  defaultValue: 0,
  enum: QuestionTypeEnum
}, {
  label: "使用次数",
  prop: "number",
  isTable: true,
  isSearch: true,
  formType: "input",
}, {
  label: "创建人",
  prop: "updated_at",
  isTable: true,
}, {
  label: "创建时间",
  prop: "created_at",
  isTable: true,
}]
const radioFormColumn = [{
  label: "单选题目",
  prop: "title",
  formType: "input",
  required: true,
  max: 200,
  isForm: true
}, {
  label: "选项",
  prop: "options",
  formType: "input",
  required: true,
  max: 200,
  isForm: true,
  isAdd: true,
}]
const checkboxFormColumn = [{
  label: "多选题目",
  prop: "title",
  formType: "input",
  required: true,
  max: 200,
  isForm: true,
}, {
  label: "选项",
  prop: "options",
  formType: "input",
  required: true,
  max: 200,
  isForm: true,
  isAdd: true,
}]
const textFormColumn = [{
  label: "问答题题目",
  prop: "title",
  formType: "input",
  required: true,
  max: 200,
  isForm: true
}]
const tableConfig = {
  editBtnShow: true,
  buttons: ["edit", "view", "delete"]
}
const pageConfig= {
  small: false,
  disabled: false,
  background: false,
}

export { checkboxFormColumn, radioFormColumn, textFormColumn, tableColumn, tableConfig, pageConfig };
